import {createStore,applyMiddleware} from "redux";
import rootReducer from "./reducers"
import thunk from 'redux-thunk'
import { composeWithDevTools } from 'redux-devtools-extension'
import {getToken} from "@/utils/token";

const preloadState = {
  login : getToken()
}
const store = createStore(rootReducer,preloadState,composeWithDevTools(applyMiddleware(thunk)))

export default store